# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=francis
pkgver=1.1.0
pkgrel=0
pkgdesc="Track your time"
url="https://invent.kde.org/utilities/francis"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
license="GPL-3.0-or-later AND LGPL-2.0-or-later and BSD-2-Clause AND BSD-3-Clause"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kcoreaddons-dev
	kdbusaddons-dev
	ki18n-dev
	kirigami-addons-dev
	kirigami-dev
	knotifications-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qtsvg-dev
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/utilities/francis.git"
source="https://download.kde.org/stable/francis/francis-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	xvfb-run ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
2adf8cd87cd1bcc03df7a0b889c4bdab00c58444adef59988ca3b3f3c151403b1cb2a46509934fc2dd98557edfb6f0f06335fe18b70a4efad1daffb768d516e8  francis-1.1.0.tar.xz
"
